package seiacpjava_a2.datastructures.hashtable;

public class ModuloStrategy extends HashTableStrategy{

	@Override
	public int hash(int item) {
		 int hashIndex = item % numberOfBuckets;	 
		 return hashIndex;
	}

	@Override
	public int calculateNumberOfBuckets(int[] items) {
		 int maxSize = items.length;
		 numberOfBuckets = (maxSize <= 100) ? 10: maxSize / 10 ;
		 return numberOfBuckets; 
		
	}

}
